<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: Wickr_node</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wickr_node</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__node.html">wickr_node</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents a message destination at a point in time.  <a href="structwickr__node.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga293b1210648e2db5449be23fe0f3e644"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga293b1210648e2db5449be23fe0f3e644">wickr_node_create</a> (<a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *dev_id, <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *id_chain, <a class="el" href="structwickr__ephemeral__keypair.html">wickr_ephemeral_keypair_t</a> *ephemeral_keypair)</td></tr>
<tr class="separator:ga293b1210648e2db5449be23fe0f3e644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ed650b947df7316cf0f915805ac5aa4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga2ed650b947df7316cf0f915805ac5aa4">wickr_node_rotate_keypair</a> (<a class="el" href="structwickr__node.html">wickr_node_t</a> *node, <a class="el" href="structwickr__ephemeral__keypair.html">wickr_ephemeral_keypair_t</a> *new_keypair, bool copy)</td></tr>
<tr class="separator:ga2ed650b947df7316cf0f915805ac5aa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga393c4fb42022fdc6f4336a62dbc7af91"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga393c4fb42022fdc6f4336a62dbc7af91">wickr_node_copy</a> (const <a class="el" href="structwickr__node.html">wickr_node_t</a> *source)</td></tr>
<tr class="separator:ga393c4fb42022fdc6f4336a62dbc7af91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6acf07885403d9df6baad36a8d797f73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga6acf07885403d9df6baad36a8d797f73">wickr_node_destroy</a> (<a class="el" href="structwickr__node.html">wickr_node_t</a> **node)</td></tr>
<tr class="separator:ga6acf07885403d9df6baad36a8d797f73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac9e2d96e9109590124b2fd05a8826c1d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#gac9e2d96e9109590124b2fd05a8826c1d">wickr_node_verify_signature_chain</a> (<a class="el" href="structwickr__node.html">wickr_node_t</a> *node, const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine)</td></tr>
<tr class="separator:gac9e2d96e9109590124b2fd05a8826c1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga504ebe707aa003032c4ac8044d73ee92"><td class="memItemLeft" align="right" valign="top">wickr_node_array_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga504ebe707aa003032c4ac8044d73ee92">wickr_node_array_new</a> (uint32_t node_count)</td></tr>
<tr class="separator:ga504ebe707aa003032c4ac8044d73ee92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae511a75489982fc2e90271be63d9d753"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#gae511a75489982fc2e90271be63d9d753">wickr_node_array_set_item</a> (wickr_array_t *array, uint32_t index, <a class="el" href="structwickr__node.html">wickr_node_t</a> *node)</td></tr>
<tr class="separator:gae511a75489982fc2e90271be63d9d753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga878a3015abc8563d512c0e5acf10df60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga878a3015abc8563d512c0e5acf10df60">wickr_node_array_fetch_item</a> (const wickr_array_t *array, uint32_t index)</td></tr>
<tr class="separator:ga878a3015abc8563d512c0e5acf10df60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab577103b1752357b8575b064e22a4970"><td class="memItemLeft" align="right" valign="top">wickr_node_array_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#gab577103b1752357b8575b064e22a4970">wickr_node_array_copy</a> (const wickr_node_array_t *array)</td></tr>
<tr class="separator:gab577103b1752357b8575b064e22a4970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6012a4fe980b1a616369cbc4b0a95f74"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga6012a4fe980b1a616369cbc4b0a95f74">wickr_node_serialize</a> (const <a class="el" href="structwickr__node.html">wickr_node_t</a> *node)</td></tr>
<tr class="separator:ga6012a4fe980b1a616369cbc4b0a95f74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3906f6da9fbd61172d2d65466773aa83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#ga3906f6da9fbd61172d2d65466773aa83">wickr_node_create_from_buffer</a> (const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer, const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine)</td></tr>
<tr class="separator:ga3906f6da9fbd61172d2d65466773aa83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3f40f122baca50bcc62af54eaa08fe9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__node.html#gab3f40f122baca50bcc62af54eaa08fe9">wickr_node_array_destroy</a> (wickr_node_array_t **array)</td></tr>
<tr class="separator:gab3f40f122baca50bcc62af54eaa08fe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gab577103b1752357b8575b064e22a4970"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab577103b1752357b8575b064e22a4970">&#9670;&nbsp;</a></span>wickr_node_array_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wickr_node_array_t* wickr_node_array_copy </td>
          <td>(</td>
          <td class="paramtype">const wickr_node_array_t *&#160;</td>
          <td class="paramname"><em>array</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Make a deep copy of a node array</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>the array to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated wickr_node_array that contains a copy of each element from 'array' </dd></dl>

</div>
</div>
<a id="gab3f40f122baca50bcc62af54eaa08fe9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab3f40f122baca50bcc62af54eaa08fe9">&#9670;&nbsp;</a></span>wickr_node_array_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_node_array_destroy </td>
          <td>(</td>
          <td class="paramtype">wickr_node_array_t **&#160;</td>
          <td class="paramname"><em>array</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a node array</p>
<p>NOTE: Nodes in the array are not destroyed, only the container array</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>the array to destroy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga878a3015abc8563d512c0e5acf10df60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga878a3015abc8563d512c0e5acf10df60">&#9670;&nbsp;</a></span>wickr_node_array_fetch_item()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__node.html">wickr_node_t</a>* wickr_node_array_fetch_item </td>
          <td>(</td>
          <td class="paramtype">const wickr_array_t *&#160;</td>
          <td class="paramname"><em>array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fetch an item in the node array</p>
<p>NOTE: a fetched node is not copied out of the array, it is still owned by the array</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>the array to fetch from </td></tr>
    <tr><td class="paramname">index</td><td>the index in the array to fetch from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the node at 'index'. NULL if the index is out of bounds </dd></dl>

</div>
</div>
<a id="ga504ebe707aa003032c4ac8044d73ee92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga504ebe707aa003032c4ac8044d73ee92">&#9670;&nbsp;</a></span>wickr_node_array_new()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wickr_node_array_t* wickr_node_array_new </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>node_count</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create an array of nodes</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">node_count</td><td>the number of nodes the array should hold </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated array with enough space to hold 'node_count' nodes </dd></dl>

</div>
</div>
<a id="gae511a75489982fc2e90271be63d9d753"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae511a75489982fc2e90271be63d9d753">&#9670;&nbsp;</a></span>wickr_node_array_set_item()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wickr_node_array_set_item </td>
          <td>(</td>
          <td class="paramtype">wickr_array_t *&#160;</td>
          <td class="paramname"><em>array</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td>
          <td class="paramname"><em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set an item in the node array</p>
<p>NOTE: 'node' is not copied into the array, ownership is simply transferred to the array</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>the array to set a node into </td></tr>
    <tr><td class="paramname">index</td><td>the index to place the node into the array </td></tr>
    <tr><td class="paramname">node</td><td>the node to place at 'index' in the array </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the insert succeeds, false if the index is out of range </dd></dl>

</div>
</div>
<a id="ga393c4fb42022fdc6f4336a62dbc7af91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga393c4fb42022fdc6f4336a62dbc7af91">&#9670;&nbsp;</a></span>wickr_node_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__node.html">wickr_node_t</a>* wickr_node_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy an node</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>the node to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated node holding a deep copy of the properties of 'source' </dd></dl>

</div>
</div>
<a id="ga293b1210648e2db5449be23fe0f3e644"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga293b1210648e2db5449be23fe0f3e644">&#9670;&nbsp;</a></span>wickr_node_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__node.html">wickr_node_t</a>* wickr_node_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>dev_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td>
          <td class="paramname"><em>id_chain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__ephemeral__keypair.html">wickr_ephemeral_keypair_t</a> *&#160;</td>
          <td class="paramname"><em>ephemeral_keypair</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a node from components</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev_id</td><td>see '<a class="el" href="structwickr__node.html" title="Represents a message destination at a point in time.">wickr_node</a>' property documentation </td></tr>
    <tr><td class="paramname">id_chain</td><td>see '<a class="el" href="structwickr__node.html" title="Represents a message destination at a point in time.">wickr_node</a>' property documentation </td></tr>
    <tr><td class="paramname">ephemeral_keypair</td><td>see '<a class="el" href="structwickr__node.html" title="Represents a message destination at a point in time.">wickr_node</a>' property documentation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated node. Takes ownership of the passed inputs </dd></dl>

</div>
</div>
<a id="ga3906f6da9fbd61172d2d65466773aa83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3906f6da9fbd61172d2d65466773aa83">&#9670;&nbsp;</a></span>wickr_node_create_from_buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__node.html">wickr_node_t</a>* wickr_node_create_from_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *&#160;</td>
          <td class="paramname"><em>engine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a node from a buffer that was created with 'wickr_node_serialize'</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>the buffer that contains a serialized representation of a node </td></tr>
    <tr><td class="paramname">engine</td><td>the crypto engine to use to import the key components of the node </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized node or null if the deserialization fails </dd></dl>

</div>
</div>
<a id="ga6acf07885403d9df6baad36a8d797f73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6acf07885403d9df6baad36a8d797f73">&#9670;&nbsp;</a></span>wickr_node_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_node_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__node.html">wickr_node_t</a> **&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a node</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">node</td><td>a pointer to the node to destroy. All properties of '*node' will also be destroyed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga2ed650b947df7316cf0f915805ac5aa4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2ed650b947df7316cf0f915805ac5aa4">&#9670;&nbsp;</a></span>wickr_node_rotate_keypair()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wickr_node_rotate_keypair </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__ephemeral__keypair.html">wickr_ephemeral_keypair_t</a> *&#160;</td>
          <td class="paramname"><em>new_keypair</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Rotate in a new ephemeral key pair for message sending</p>
<p>NOTE: This function DOES NOT ensure that new_keypair is signed properly. To do that, you must call 'wickr_node_verify_signature_chain' after rotation</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">node</td><td>the node to rotate 'new_keypair' into </td></tr>
    <tr><td class="paramname">new_keypair</td><td>the key pair to rotate into place </td></tr>
    <tr><td class="paramname">copy</td><td>if true, perform a deep copy of 'new_keypair' before rotating </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the rotation succeeds, false if the copy fails </dd></dl>

</div>
</div>
<a id="ga6012a4fe980b1a616369cbc4b0a95f74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6012a4fe980b1a616369cbc4b0a95f74">&#9670;&nbsp;</a></span>wickr_node_serialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_node_serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serialize a node to bytes</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">node</td><td>the node to serialize </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a buffer containing a serialized representation of 'node' or null if serialization fails </dd></dl>

</div>
</div>
<a id="gac9e2d96e9109590124b2fd05a8826c1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac9e2d96e9109590124b2fd05a8826c1d">&#9670;&nbsp;</a></span>wickr_node_verify_signature_chain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wickr_node_verify_signature_chain </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__node.html">wickr_node_t</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *&#160;</td>
          <td class="paramname"><em>engine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Verify the integrity of the signature chain for a node</p>
<p>In order to be valid, the ephemeral keypair's signature must validate with the id_chain's 'node' public signing key. The id_chain's 'node' signature must validate with the id_chain's 'root' public signing key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">node</td><td>the node to verify </td></tr>
    <tr><td class="paramname">engine</td><td>a crypto engine capable of verifying EC signatures </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the chain validates, false if there are any signature validation failures </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
